As one of standard technologies of coding video data, there is MPEG-4 Part 10: Advanced Video Coding (simply as MPEG-4 AVC) defined by Moving Picture Experts Group (MPEG) of ISO/IEC JTC1. In this MPEG-4 AVC, it is possible to select, as a block size for orthogonal transformation, an orthogonal transformation size of 4 pixels×4 pixels or an orthogonal transformation size of 8 pixels×8 pixels.
In the case of using the orthogonal transformation size of 4 pixels×4 pixels, an area where block noise and mosquito noise are diffused is smaller, so that such noise is hardly observed. However, since frequency resolution is lower, it is a possibility of decreasing coding efficiency in images with high correlation in a wide range. Therefore, the orthogonal transformation size of 4 pixels×4 pixels is selected only for portions where edges such as character portions are sharp and mosquito noise is likely to occur, while the orthogonal transformation size of 8 pixels×8 pixels is selected for portions having high correlation such as natural image. As a result, it is possible to improve image quality while suppressing the decrease of coding efficiency.
Patent Literature 1 explains a method of switching an orthogonal transformation size to another, by detecting an edge in a block.
By the orthogonal transformation size selection method disclosed in Patent Literature 1, an edge is detected from a target block and it is determined based on the number of detected edges whether or not there is an edge. Furthermore, by the orthogonal transformation size selection method disclosed in Patent Literature 1, the orthogonal transformation size of 4 pixels×4 pixels is selected if a determination is made that there is an edge, while the orthogonal transformation size of 8 pixels×8 pixels is selected if a determination is made that there is no edge. Moreover, in the disclosure of Patent Literature 1, as the edge detection method, a method using a difference among adjacent pixels is described.
In addition, Patent Literature 2 discloses a method of calculating a luminance histogram in a block and determining whether or not the block includes an image of character (hereinafter, referred to simply as a “character”). Here, a luminance histogram of a natural image shows monomodal distribution having a single mountain (crest). Furthermore, if there is a character in the block, the luminance histogram of the image shows bimodal distribution having two mountains. Based on such distribution characteristics, in Patent Literature 2, it is determined that the block includes a character if the luminance histogram in the block shows bimodal distribution, while it is determined that the block does not include any character if the luminance histogram in the block does not show bimodal distribution.